Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event handler to Applier/Destroyer #1199

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

karlkfi
Copy link
Contributor

@karlkfi karlkfi commented Apr 26, 2024

Use an injected event handler function to avoid needing to cache errors in the supervisor. Instead, cache errors in the Updater, which already has a lock for this.

This event handler simplifies the Applier/Destroyer API and makes it easy to add more events in the future, like for inventory updates.

Dependencies:

pkg/applier/applier.go Show resolved Hide resolved
pkg/parse/updater.go Show resolved Hide resolved
pkg/applier/applier.go Outdated Show resolved Hide resolved
pkg/applier/applier.go Show resolved Hide resolved
@karlkfi
Copy link
Contributor Author

karlkfi commented May 3, 2024

/retest

@karlkfi karlkfi force-pushed the karl-applier-events branch 2 times, most recently from c168435 to 5c19187 Compare May 30, 2024 00:59
@karlkfi karlkfi changed the title [WIP] Add event handler to Applier/Destroyer Add event handler to Applier/Destroyer May 30, 2024
@karlkfi karlkfi requested a review from nan-yu May 30, 2024 01:50
Use an injected event handler function to avoid needing to cache
errors in the supervisor. Instead, cache errors in the Updater,
which already has a lock for this.

This event handler simplifies the Applier/Destroyer API and makes
it easy to add more events in the future, like for inventory updates.
Copy link
Contributor

@nan-yu nan-yu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nan-yu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 718c7f4 into main May 31, 2024
8 checks passed
@karlkfi karlkfi deleted the karl-applier-events branch May 31, 2024 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants